1. Field of the Invention
The present invention relates to a method, an apparatus, and a program for processing image description data expressed in an image description language.
2. Description of the Related Art
A result of processing data by an information processing apparatus has conventionally been output at high quality to a laser printer or the like. Thus, a parser for a page description language which is one of an image description language type is mounted on a printer, and parsing of page description data is executed by the printer to perform rendering. A representative page description language is POSTSCRIPT™ provided by Adobe Systems Incorporated.
Some of the existing page description languages have affine transformation commands prepared for graphics and characters in addition to commands for designating coordinates and colors. Affine transformation processing is geometrical transformation processing of graphics which includes enlargement, reduction, rotation, translation processing, and the like for graphics and characters. In many cases, the processing is generally accompanied by a linear transformation and a translation. The affine transformation processing can be carried out in multiple manners. For example, processing for executing a translation after transformation of rotation for graphics or characters can be expressed by the existing page description language.
Conventionally, when a rendering processing command described in a page description data contains an affine transformation processing command, an iterative calculation is performed in, e.g., a printer, to perform rendering processing according to the description. FIGS. 11A and 11B show an example of rendering a rectangle by executing an affine transformation in multiple manners according to description specifications of POSTSCRIPT™. FIG. 11A shows page description data described in POSTSCRIPT™ language, while FIG. 11B shows a result of rendering processing.
Referring to FIG. 11A, an affine transformation processing command is executed at 3rd to 5th lines, and a graphic is rendered at 7th to 11th lines. The graphic designated to be rendered at the 7th to 11th lines is a rectangle parallel to X and Y axes and having one apex set as an origin. However, as shown in FIG. 11B, an actually rendered graphic becomes a parallelogram due to the affine transformation processing performed at the 3rd to 5th lines.
Furthermore, in the existing page description languages, a character string can be rendered with a layout designated. FIGS. 12A and 12B show a description example of head, center, and tail alignments relative to designated points. FIG. 12A shows page description data described in POSTSCRIPT™ language, and FIG. 12B shows a result of executing rendering processing.
Referring to FIG. 12A, definition is made for a center alignment at 5th to 10th lines, and a right alignment at 12th to 17th lines. At 19th to 21st lines, the same X coordinates are designated. Additionally, a layout is calculated for a designated point by description to refer to a center or right alignment, so that a rendering result such as that shown in FIG. 12B can be obtained. Examples of enlarging a pitch between characters as shown in FIGS. 14A and 14B and arranging characters on a curve (circular arc) as shown in FIGS. 15A and 15B are discussed in “POSTSCRIPT Tutorial & Cookbook” (written by Adobe Systems, and edited by ASCII Publishing Technical Division).
Data described as the page description data shown in FIGS. 12A, 14A, and 15A have conventionally been subjected to rendering processing by internally calculating a layout in an image forming apparatus such as a printer.
Recently, specifications of Scalable Vector Graphics (SVG) have been formulated by World Wide Web Consortium (W3C), and its application to a page description language is now under study. As in the case of POSTSCRIP™, SVG can render given graphics or characters by designating coordinates and colors or affine transformation processing. According to the specifications, designation methods for character layouts are diverse, and can be flexibly designated.
Conventional page description languages, structured languages, such as SVG, etc., are referred to as image description languages. As described above, when an affine transformation command is described in a page description language, processing is iterated, and a tree structure may be described deeper than necessary even in a structured language. Such unnecessary processing increases latency, and thereby, reduces the overall performance of the information processing apparatus.
To overcome the aforementioned drawbacks, there has been an attempt to reduce unnecessary processing due to, for instance, when an affine transformation command is described in a page description language. For example, in Japanese Patent Application Laid-open Nos. 2002-108850 and 2004-240491, in a structured language, layers of a tree structure are reduced or a structure transformation is carried out. However, the process performed in Japanese Patent Application Laid-open Nos. 2002-108850 and 2004-240491 have disadvantages because they do not reduce processing load of a processor suffering from rendering complicated image. It would be desirable to provide efficient preprocessing for rendering an image described with structured language data.